<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript">

	$(function(){
		
		
		$('#btn').click(function(){
			$.ajax({
				type:'post',
				url:"test/myAjax3.do",
				data:{name:"张三",
					age:19},
					dataType: "text", 
				success:function(data1){
					console.log(data1);
					alert(data1);
					console.log(typeof(data1));
					
					var json = eval("("+data1+")");//将json类型字符串转换为json对象
					
					console.log(json);
				}
			});
		})
		
	});
	

</script>
<body>
	<h2>Hello World!</h2>
	
	<input id="btn" type="button" value="提交Ajax请求,返回数据">
</body>
</html>
